Simon

by: emma-l-myoosik

This game was made for my level 2 project at The League of Amazing Programmers.
Click here to download and play!


1. Why I Made This Game

Originally, I had wanted to create a game with more vivid graphics and a more complex premise, but I realized that for a Level 2 project, my goals were a bit too ambitious, especially considering my own skillset. So, I sifted through simple games that would still be challenging to code and interesting to play. I decided on Simon, a game that I remember enjoying when I was younger. Simon is a tricky game and gets very difficult the longer you go, but it's fun.


2. What I Learned

From the user test feedback, I learned that my restart function was not working as I expected--it should work now. :) Another piece of feedback that I received was adding a pause between the end of the sequence and the user's turn. I tried to do this but couldn't find a solid solution that worked consistently; since it's a rather small detail, I let it be. I was also advised to add a pop-up message every time the user completed a round, but when I tested that I found it to be rather annoying, so I didn't include it.


3. Architecture of My Game

The game is split into the start page, the game itself, and then an end-game page. The most important is, of course, the game page; that's where the game itself actually occurs. I use three classes to make this game possible: a runner class, the Game Panel class that contains all of the user interface and interactive parts, and another class that checks the pattern entered to it from the panel class; basically, it checks the answer to the inputted pattern. Because the game isn't too complicated in terms of graphics or design (really, it's the debugging that took up all the time), there aren't many classes.


4. Technical Implementation

Most of my code is in the Game Panel since my game mostly relies on mouse-clicks and action listeners, with a small bit in both the runner class and the check-answer class (called Segment). I was pretty proud of how my game came together; there was a particularly challenging bit when I had to make sure the computer only recorded one click per square so that the Segment class could run correctly. I ended up using a boolean and the mouse released method, setting the boolean to true when the mouse was clicked and then changing it to false once the mouse was released. I also had issues with making sure the game restarted properly, since there were numerous aspects of the game I had to make sure I reset or cleared--it took a while to make right.


5. Most Challenging Part

The most challenging part of this project was probably the amount of time it took to finish it and how large it was. The Level 2 game is the first big project that I've done for League, and it was extremely frustrating at times when I would hit roadblocks and it would take days or even multiple classes to resolve them. Most of the time, this was due to one small error or a missing line of code, so my code required constant debugging just to ensure that I didn't spend even more time having to go back to fix mistakes. I used many internet and human resources to help fix each issue that came up when coding the project, and it was an enlightening experience.


6. Future Fixes and Updates

If I continued to work on the game, I would probably try to fix the aesthetic of the game to look nicer and not so blocky, since my "squares" are currently solid-colored J-Labels and clash a bit with the background. I might try adding sound to the game so that it is a more authentic version of Simon (e.g. each button, when clicked, has a different pitch to engage both sound and sight). I would also add a more obvious indicator that tells the user when they have moved on to the next round instead of just text on a JLabel, but that isn't as interfering as a pop-up label.